package band.wukong.practice.webservice.kh.sample06;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jws.WebService;

/**
 * 自己写一个实现类
 *
 * @author wukong(wukonggg@139.com)
 */
@WebService(
    endpointInterface = "band.wukong.practice.webservice.kh.sample06.CalcService",
    targetNamespace = "http://www.wukong.band/practice/webservice/kh/sample06/",
    wsdlLocation = "META-INF/wsdl/kh/sample06.xml"
)
public class CalcServiceImpl implements CalcService {

    private final Logger logger = LoggerFactory.getLogger(CalcServiceImpl.class);

    @Override
    public int add(int num1, int num2) {
        int result = num1 + num2;
        logger.debug("result = " + result);
        return result;
    }

    @Override
    public int divide(int num1, int num2) {
        int result = num1 / num2;
        logger.debug("result = " + result);
        return result;
    }

}
